package com.mcxx.modules.temporary.family.dao.write;

import com.mcxx.modules.miniSalvation.family.entity.FamilyMainEntity;
import com.mcxx.modules.temporary.family.entity.TmpFamilyMainEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface TmpFamilyMainWriteDao {


    int insertIgnoreNull(TmpFamilyMainEntity familyMain);



    int updateIgnoreNull(TmpFamilyMainEntity familyMain);


    Boolean deleteFamilyMainById(@Param("id")String id);


    int updateFamilyIncomeById(String familyId, double income);


    int updateSaveMemberById(String familyId, int saveMemberObject);


    int deleteFmySalaryByOrderId(@Param("orderId")String orderId);


    int changeSaveMemberById(@Param("id")String id,@Param("masterInSave")String masterInSave,@Param("change") String change);


    int updateSaveMemberByFamilyId(@Param("id")String id);


    int copyFromOtherSource(@Param("familyId") String familyId,@Param("newFamilyId") String newFamilyId);


    int copyFromSplittingSource(@Param("familyId") String familyId,@Param("newFamilyId") String newFamilyId,@Param("idcard") String idcard);


    int copyFromLowerSource(@Param("familyId") String familyId,@Param("newFamilyId") String newFamilyId);


    int copyFromLowerSplitSource(@Param("familyId") String familyId,@Param("newFamilyId") String newFamilyId);


    int updateFamilyByFamilyId(FamilyMainEntity family);

    int updateTempFamilyInfo(@Param("familyIds") List<String> familyIds);

    int deleteFamilyMainByIdCard(String idCard);

    int deleteFamilyMainByIdCardAndNoHasFamilyId(String idCard, String familyId);
}
